#ifndef GENPASSWD_H_
#define	GENPASSWD_H_

#define MAX_NAME_LENGTH 12
#define MAX_USER_KEY_LENGTH 8

#define KEY_SIZE 16
#define STORE_KEY_LENGTH (KEY_SIZE * 2)

#define MAX_USERS 10

typedef struct {
	char name[MAX_NAME_LENGTH];
	char key[MAX_USER_KEY_LENGTH + 1];
	char storekey[STORE_KEY_LENGTH +1];
} User;

User** readUsers(char *file, int *total);
void printUsers(User **users, int count);
void encodePassword(User *user, unsigned char *key);
void encodePassword2(User *user, unsigned char *key);
void encodePasswords(User **users, int count, unsigned char *key);

#endif /* GENPASSWD_H_ */
